<template>
	<div style="width: 250px;height: 30px;margin-left: 450px;">
	<el-form :model="addForm" :rules="addFormRules" ref="addFormRef" label-width="70px"></el-form>
	<el-input v-model="input" placeholder="请输入用户名"></el-input>
	<el-input placeholder="请输入密码" v-model="input" show-userpwd style="margin-top: 10px;"></el-input>
	<el-input placeholder="请输入身份证号" v-model="input"show-userId style="margin-top: 10px;"></el-input>
	<el-input placeholder="请输入手机号" v-model="input" show-userphone style="margin-top: 10px;"></el-input>
	<!-- <el-button style="margin-top: 20px;">确定注册</el-button> -->
	<el-button type="primary" @click="addUser"style="margin-top: 20px;">确 定</el-button>
	</div>
</template>

<script>
	export default {
	  data() {
	     return {
	      addForm: {
	        username: '',
	        password: '',
	        userId: '',
	        userphone: ''
	      },
	      addFormRules: {
	        username: [
	          { required: true, message: '请输入用户名', trigger: 'blur' },
	          { min: 2, max: 8, message: '长度为2-8个字符', trigger: 'blur' }
	        ],
	        userpwd: [
	          { required: true, message: '请输入密码', trigger: 'blur' },
	          { min: 6, max: 15, message: '长度为6-15个字符', trigger: 'blur' }
	        ],
	        userId: [
	          { required: true, message: '请输入身份证号', trigger: 'blur' }
	        ],
	        userphone: [
	          { required: true, message: '请输入手机好', trigger: 'blur' }
	        ]
	      }
	     }
	  }
	}
</script>



	

